package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.QServiceMapper;
import com.ruoyi.system.domain.QService;
import com.ruoyi.system.service.IQServiceService;
import com.ruoyi.common.core.text.Convert;

/**
 * 服务对话列Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-20
 */
@Service
public class QServiceServiceImpl implements IQServiceService 
{
    @Autowired
    private QServiceMapper qServiceMapper;

    /**
     * 查询服务对话列
     * 
     * @param serviceId 服务对话列主键
     * @return 服务对话列
     */
    @Override
    public QService selectQServiceByServiceId(String serviceId)
    {
        return qServiceMapper.selectQServiceByServiceId(serviceId);
    }

    /**
     * 查询服务对话列列表
     * 
     * @param qService 服务对话列
     * @return 服务对话列
     */
    @Override
    public List<QService> selectQServiceList(QService qService)
    {
        return qServiceMapper.selectQServiceList(qService);
    }

    @Override
    public List<QService> selectQServiceListNomanyi(QService qService)
    {
        return qServiceMapper.selectQServiceListNomanyi(qService);
    }

    @Override
    public List<QService> selectQServiceListNomanyiYiban(QService qService)
    {
        return qServiceMapper.selectQServiceListNomanyiYiban(qService);
    }


    @Override
    public List<QService> selectQServiceListState(QService qService)
    {
        return qServiceMapper.selectQServiceListState(qService);
    }

    @Override
    public List<QService> selectQServiceListForbmy(QService qService)
    {
        return qServiceMapper.selectQServiceListForbmy(qService);
    }



    /**
     * 新增服务对话列
     * 
     * @param qService 服务对话列
     * @return 结果
     */
    @Override
    public int insertQService(QService qService)
    {
        return qServiceMapper.insertQService(qService);
    }

    /**
     * 修改服务对话列
     * 
     * @param qService 服务对话列
     * @return 结果
     */
    @Override
    public int updateQService(QService qService)
    {
        return qServiceMapper.updateQService(qService);
    }

    @Override
    public int updateQServiceState(QService qService)
    {
        qService.setState("3");  //3--已经接通
        return qServiceMapper.updateQServiceState(qService);
    }

    /**
     * 批量删除服务对话列
     * 
     * @param serviceIds 需要删除的服务对话列主键
     * @return 结果
     */
    @Override
    public int deleteQServiceByServiceIds(String serviceIds)
    {
        return qServiceMapper.deleteQServiceByServiceIds(Convert.toStrArray(serviceIds));
    }

    /**
     * 删除服务对话列信息
     * 
     * @param serviceId 服务对话列主键
     * @return 结果
     */
    @Override
    public int deleteQServiceByServiceId(String serviceId)
    {
        return qServiceMapper.deleteQServiceByServiceId(serviceId);
    }
}
